using System;
using UnityEngine.UI;
using UnityEngine.EventSystems;

namespace HEFramework
{
    /// <summary>
    ///
    /// UI按钮行为接口
    /// 
    /// ----------------------------------------
    /// 作者 hep
    /// 创建时间：2023-02-14 10:36:07
    /// ----------------------------------------
    /// </summary>
    public interface IUIButtonBehaviour : IUIBehaviour, IPointerEnterHandler, IPointerDownHandler, IPointerUpHandler, IPointerExitHandler
    {
        /// <summary>
        /// 按钮
        /// </summary>
        Button Button { get; }

        /// <summary>
        /// 进入
        /// </summary>
        void OnEnter();

        /// <summary>
        /// 按下
        /// </summary>
        void OnDown();

        /// <summary>
        /// 抬起
        /// </summary>
        void OnUp();

        /// <summary>
        /// 离开
        /// </summary>
        void OnExit();

        /// <summary>
        /// 是否可以使用
        /// </summary>
        void Enable(bool _isEnable);

        /// <summary>
        /// 注册进入事件
        /// </summary>
        /// <param name="_callback"></param>
        IUIButtonBehaviour RegisterEnterEvent(Action _callback);

        /// <summary>
        /// 注册按下事件
        /// </summary>
        /// <param name="_callback"></param>
        IUIButtonBehaviour RegisterDownEvent(Action _callback);

        /// <summary>
        /// 注册抬起事件
        /// </summary>
        /// <param name="_callback"></param>
        IUIButtonBehaviour RegisterUpEvent(Action _callback);

        /// <summary>
        /// 注册离开事件
        /// </summary>
        /// <param name="_callback"></param>
        IUIButtonBehaviour RegisterExitEvent(Action _callback);
    }
}